#include "ShellInfo.h"

#include <CharacterSet.h>
#include <CharacterSetRoster.h>

using namespace BPrivate; // BCharacterSet stuff

ShellInfo::ShellInfo()
    : fProcessID(-1),
      fISDefaultShell(true),
      fEncoding(M_UTF8),
      fEncodingName("UTF-8")
{
}

void ShellInfo::SetEncoding(int encoding)
{
    fEncoding = encoding;

    const BCharacterSet *charset =
        BCharacterSetRoster::GetCharacterSetByConversionID(fEncoding);

    fEncodingName = charset->GetName() : "UTF-8"; // set gbk or utf 8
}

// END: CODEREVIEW: